package com.framework.admin.repository;

import com.framework.admin.model.SysUser;
import com.framework.common.repository.BaseJpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends BaseJpaRepository<SysUser, String> {
    SysUser findByAccount(String account);

    @Query("select t.name from SysUser t where t.id=:id")
    String getNameById(@Param("id") String id);
}
